<?php $this->load->view('header/standard'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
            <?php if (isset($messages)) echo $messages; ?>

            <div id="submenu-container" class="span-17 last">
                <?php $this->load->view('menu/profile'); ?>
            </div>
            
			<form action="" method="post">
            <fieldset class="span-16 last box">
                <legend class="caps"><?=lang('profile.license.Add')?></legend>
                <?php if (count($licenses) > 0):?>
                <div class="span-15 last">
	                <div class="span-7 prepend-1">
						<p>
							<label for="license">License: </label>
							<?php echo form_dropdown('license', $licenses); ?>
						</p>
						<p>
							<label for="number">Number: </label> 
							<?php echo form_input('number')?>
						</p>
	                    <p>
	                        <label for="examiner">Examiner:</label> 
	                        <?php echo form_dropdown('examiner', $examiners); ?>
	                    </p>
	                </div>
	                <div class="span-7 last">
						<p>
							<label for="issued">Issued: </label> 
							<input type="text" id="dp1" size="10" maxlength="10" name="issued" />
						</p>
						<p>
							<label for="renewed">Renewed: </label> 
							<input type="text" id="dp2" size="10" maxlength="10" name="renewed" />
						</p>
						<p>
							<label for="expires">Expires: </label> 
							<input type="text" id="dp3" size="10" maxlength="10" name="expires" />
						</p>
	                </div>
                </div>
                <div class="span-16 last">
                    <p><?php echo form_submit('action',lang('profile.license.Add')); ?></p>
                </div>
                <?php ?>
                <?php else: ?>
                    <p class="span-15"><?=lang('profile.license.No_more_licenses_to_add')?></p>
                <?php endif; ?> 
                </fieldset>
			</form>
        </div> <!-- end content -->
        <div class="span-6 last" id="sidebar">
          <?php $this->load->view('menu/sidebar', array('person' => $person, 'context' => 'pilot'))?>
        </div> <!-- end sidebar -->
    </div> <!-- end container -->
    <script type="text/javascript">
        $(function() {
            $("#dp1").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
            $("#dp2").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c-100:c'
            });
            $("#dp3").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true,
                yearRange: 'c:c+10'
            });
        });
    </script>
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
